package io;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class IO {

	public String readInput()	throws IOException {
		
		System.out.print("Input the name of the article: ");
		Scanner input=new Scanner(System.in);
		String fileName=input.next();

		InputStreamReader inputStreamReader = new InputStreamReader(new FileInputStream(fileName+".txt"));
		BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
		String words = "";
		String article= "";
		while((words = bufferedReader.readLine())!=null)
		{
			article += words;
		}
		System.out.println("The input article: "+article);
		
		return article;
	}
	public void outputResult(boolean isVocab)
	{
		System.out.println(isVocab);
	}
	
}
